package com.example.order.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * OrderController class
 *
 * @author zhangl
 * @date 2023/4/27 13:08
 */
@RestController
@RefreshScope
public class OrderController {
    @Value("${order.version:0}")
    private String version;

    @GetMapping("/version")
    public String getVersion() {
        return "Order Service Version : " + version;
    }
}
